﻿<div class="search-page">
    <h2>共有{{paginationConf.totalItems}}条公文</h2>
    <div class="search">
        <div class="search-condition">
            <div class="form-inline">
                <div class="form-group">
                    <label for="lwwh">来文文号：</label>
                    <input type="text" class="form-control form-control-sm middle" id="lwwh" ng-model="pageSearch.DocumentNumber" ng-keyup="enterEvent($event)">
                </div>
                <div class="form-group">
                    <label for="title">公文标题：</label>
                    <input type="text" class="form-control form-control-sm large" id="title" ng-model="pageSearch.QueryCondition" ng-keyup="enterEvent($event)">
                </div>
                <div class="form-group">
                    <label for="sfwrq">收/发文日期：</label>
                    <input type="text" class="form-control select-date form-control-sm middle" id="sfwrq" readonly="readonly" ng-model="sfwrq">
                    <input type="text" class="hide" id="sfwrqStart" ng-model="pageSearch.StartClosedOrHairTime">
                    <input type="text" class="hide" id="sfwrqEnd" ng-model="pageSearch.EndClosedOrHairTime">
                </div>
                <div class="form-group">
                    <label for="wkfType">公文类型：</label>
                    <select class="form-control form-control-sm" id="wkfType" ng-model="pageSearch.WorkFlowId">
                        <option value="">全选</option>
                        <option ng-repeat="item in wkfDefaultTempList" value="{{item.ID}}">{{item.Title}}</option>
                    </select>
                </div>
                <div class="form-group">
                    <label for="fqbm">发起部门：</label>
                    <input type="text" class="form-control form-control-sm select-dept" id="fqbm" readonly="readonly" ng-model="fqbm">
                    <input type="text" class="hide" id="fqbmId" ng-model="pageSearch.MessageIssuedDept" />
                </div>
                <div class="form-group">
                    <label for="fqr">发起人：</label>
                    <input type="text" class="form-control form-control-sm select-empl" id="fqr" readonly="readonly" ng-model="fqr">
                    <input type="text" class="hide" id="fqrId" ng-model="pageSearch.MessageIssuedBy" />
                </div>
                <div class="form-group">
                    <label for="swxl">收文序列：</label>
                    <select class="form-control form-control-sm" id="swxl" ng-model="pageSearch.SequenceName">
                        <option value="">全选</option>
                        <option ng-repeat="item in swxl" value="{{item.Name}}">{{item.Name}}</option>
                    </select>
                </div>
                <div class="form-group">
                    <label for="swxl">收文文号：</label>
                    <input type="text" class="form-control form-control-sm" id="swxl" ng-model="pageSearch.SequenceNumber" ng-keyup="enterEvent($event)">
                </div>
                <div class="form-group">
                    <label for="wkfType">公文状态：</label>
                    <select class="form-control form-control-sm" id="wkfType" ng-model="pageSearch.MessageStatus">
                        <option value="">全选</option>
                        <option ng-repeat="item in wkfStateList" value="{{item.value}}">{{item.text}}</option>
                    </select>
                </div>
            </div>
            <div class="search-action">
                <button type="submit" class="btn btn-default btn-sm btn-search" ng-click="onReset()">重置</button>
                <button type="submit" class="btn btn-info btn-sm btn-search" ng-click="onSearch()">查询</button>
            </div>
            <div class="search-action-bottom">
                <button type="submit" class="btn btn-default btn-sm" ng-click="onExport()">批量导出</button>
            </div>
        </div>
    </div>
    <table class="table">
        <thead>
            <tr>
                <!--<th ng-repeat="title in titleObj">{{title}}</th>-->
                <th>序号</th>
                <th>公文类型</th>
                <th>来文文号</th>
                <th>公文标题</th>
                <th>收/发文日期</th>
                <th>收文文号</th>
                <th>发起部门</th>
                <th>发起人</th>
                <th>流程状态</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-if="activeTableData.length > 0" ng-repeat="row in activeTableData">
                <td>{{($index+1)+(pageSearch.PageNumber-1)*pageSearch.PageSize}}</td>
                <td>{{row.MessageTitle}}</td>
                <td>{{row.DocumentNumber || '----'}}</td>
                <td title="{{row.DocumentTitle}}" class="item-lg"><a href="/Apps/Workflow/Running/Open?mid={{row.MessageId}}" target="_blank">{{row.DocumentTitle || '----'}}</a></td>
                <td>{{row.ClosedOrHairTime.split(' ')[0]}}</td>
                <td>{{row.SequenceName}}&nbsp;&nbsp;{{row.SequenceNumber}}</td>
                <td>{{row.MessageIssuedDeptName }}</td>
                <td>{{row.MessageIssuedName}}</td>
                <!--<td class="{{wkfStateStyle[row.MessageStatus]}}">{{row.MessageStatusName}}</td>-->
                <td>
                    <span class="label {{wkfStateStyle[row.MessageStatus]}}">{{row.MessageStatusName}}</span>
                </td>
            </tr>
            <tr ng-if="!activeTableData.length">
                <td colspan="{{titleObj.length}}">无数据</td>
            </tr>
        </tbody>
    </table>
    <tm-pagination conf="paginationConf"></tm-pagination>
</div>
<div id="dlg-date-selector2" class="div-dlg">
    从：<input type="text" id="date-from2" class="date-value" /><br />
    <br />
    至：<input type="text" id="date-to2" class="date-value" />
</div>
